Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Editing Boxes

QuickDraw 3D provides routines that you can use to create and manipulate boxes. See "Boxes" for the definition of a box.

Q3Box_New

You can use the Q3Box_New function to create a new box.

TQ3GeometryObject Q3Box_New (const TQ3BoxData *boxData);
boxData
A pointer to a TQ3BoxData structure.

DESCRIPTION

The Q3Box_New function returns, as its function result, a new box having the sides and attributes specified by the boxData parameter. If a new box could not be created, Q3Box_New returns the value NULL .

Q3Box_Submit

You can use the Q3Box_Submit function to submit an immediate box for drawing, picking, bounding, or writing.

TQ3Status Q3Box_Submit (
                     const TQ3BoxData *boxData,
                     TQ3ViewObject view);
boxData
A pointer to a TQ3BoxData structure.
view
A view.

DESCRIPTION

The Q3Box_Submit function submits for drawing, picking, bounding, or writing the immediate box whose shape and attribute set are specified by the boxData parameter. The box is drawn, picked, bounded, or written according to the view characteristics specified in the view parameter.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.

Q3Box_GetData

You can use the Q3Box_GetData function to get the data that defines a box and its attributes.

TQ3Status Q3Box_GetData (
                     TQ3GeometryObject box,
                     TQ3BoxData *boxData);
box
A box.
boxData
On exit, a pointer to a TQ3BoxData structure that contains information about the box specified by the box parameter.

DESCRIPTION

The Q3Box_GetData function returns, through the boxData parameter, information about the box specified by the box parameter. QuickDraw 3D allocates memory for the TQ3BoxData structure internally; you must call Q3Box_EmptyData to dispose of that memory.

Q3Box_SetData

You can use the Q3Box_SetData function to set the data that defines a box and its attributes.

TQ3Status Q3Box_SetData (
                     TQ3GeometryObject box,
                     const TQ3BoxData *boxData);
box
A box.
boxData
A pointer to a TQ3BoxData structure.

DESCRIPTION

The Q3Box_SetData function sets the data associated with the box specified by the box parameter to the data specified by the boxData parameter.

Q3Box_EmptyData

You can use the Q3Box_EmptyData function to release the memory occupied by the data structure returned by a previous call to Q3Box_GetData .

TQ3Status Q3Box_EmptyData (TQ3BoxData *boxData);
boxData
A pointer to a TQ3BoxData structure.

DESCRIPTION

The Q3Box_EmptyData function releases the memory occupied by the TQ3BoxData structure pointed to by the boxData parameter; that memory was allocated by a previous call to Q3Box_GetData .

Q3Box_GetOrigin

You can use the Q3Box_GetOrigin function to get the origin of a box.

TQ3Status Q3Box_GetOrigin (
                     TQ3GeometryObject box,
                     TQ3Point3D *origin);
box
A box.
origin
On exit, the origin of the specified box.

DESCRIPTION

The Q3Box_GetOrigin function returns, in the origin parameter, the origin of the box specified by the box parameter.

Q3Box_SetOrigin

You can use the Q3Box_SetOrigin function to set the origin of a box.

TQ3Status Q3Box_SetOrigin (
                     TQ3GeometryObject box,
                     const TQ3Point3D *origin);
box
A box.
origin
The desired origin of the specified box.

DESCRIPTION

The Q3Box_SetOrigin function sets the origin of the box specified by the box parameter to that specified in the origin parameter.

Q3Box_GetOrientation

You can use the Q3Box_GetOrientation function to get the orientation of a box.

TQ3Status Q3Box_GetOrientation (
                     TQ3GeometryObject box,
                     TQ3Vector3D *orientation);
box
A box.
orientation
On exit, the orientation of the specified box.

DESCRIPTION

The Q3Box_GetOrientation function returns, in the orientation parameter, the orientation of the box specified by the box parameter.

Q3Box_SetOrientation

You can use the Q3Box_SetOrientation function to set the orientation of a box.

TQ3Status Q3Box_SetOrientation (
                     TQ3GeometryObject box,
                     const TQ3Vector3D *orientation);
box
A box.
orientation
The desired orientation of the specified box.

DESCRIPTION

The Q3Box_SetOrientation function sets the orientation of the box specified by the box parameter to that specified in the orientation parameter.

Q3Box_GetMajorAxis

You can use the Q3Box_GetMajorAxis function to get the major axis of a box.

TQ3Status Q3Box_GetMajorAxis (
                     TQ3GeometryObject box,
                     TQ3Vector3D *majorAxis);
box
A box.
majorAxis
On exit, the major axis of the specified box.

DESCRIPTION

The Q3Box_GetMajorAxis function returns, in the majorAxis parameter, the major axis of the box specified by the box parameter.

Q3Box_SetMajorAxis

You can use the Q3Box_SetMajorAxis function to set the major axis of a box.

TQ3Status Q3Box_SetMajorAxis (
                     TQ3GeometryObject box,
                     const TQ3Vector3D *majorAxis);
box
A box.
majorAxis
The desired major axis of the specified box.

DESCRIPTION

The Q3Box_SetMajorAxis function sets the major axis of the box specified by the box parameter to that specified in the majorAxis parameter.

Q3Box_GetMinorAxis

You can use the Q3Box_GetMinorAxis function to get the minor axis of a box.

TQ3Status Q3Box_GetMinorAxis (
                     TQ3GeometryObject box,
                     TQ3Vector3D *minorAxis);
box
A box.
minorAxis
On exit, the minor axis of the specified box.

DESCRIPTION

The Q3Box_GetMinorAxis function returns, in the minorAxis parameter, the minor axis of the box specified by the box parameter.

Q3Box_SetMinorAxis

You can use the Q3Box_SetMinorAxis function to set the minor axis of a box.

TQ3Status Q3Box_SetMinorAxis (
                     TQ3GeometryObject box,
                     const TQ3Vector3D *minorAxis);
box
A box.
minorAxis
The desired minor axis of the specified box.

DESCRIPTION

The Q3Box_SetMinorAxis function sets the minor axis of the box specified by the box parameter to that specified in the minorAxis parameter.

Q3Box_GetFaceAttributeSet

You can use the Q3Box_GetFaceAttributeSet function to get the attribute set of a face of a box.

TQ3Status Q3Box_GetFaceAttributeSet (
                     TQ3GeometryObject box,
                     unsigned long faceIndex,
                     TQ3AttributeSet *faceAttributeSet);
box
A box.
faceIndex
An index into the array of faces for the specified box.
faceAttributeSet
On exit, a pointer to an attribute set for the specified face.

DESCRIPTION

The Q3Box_GetFaceAttributeSet function returns, in the faceAttributeSet parameter, the set of attributes for the face having the index faceIndex of the box specified by the box parameter. The reference count of the set is incremented.

Q3Box_SetFaceAttributeSet

You can use the Q3Box_SetFaceAttributeSet function to set the attribute set of a face of a box.

TQ3Status Q3Box_SetFaceAttributeSet (
                     TQ3GeometryObject box,
                     unsigned long faceIndex,
                     TQ3AttributeSet faceAttributeSet);
box
A box.
faceIndex
An index into the array of faces for the specified box.
faceAttributeSet
The desired set of attributes for the specified face.

DESCRIPTION

The Q3Box_SetFacetAttributeSet function sets the attribute set of the face having index faceIndex of the box specified by the box parameter to the set specified by the faceAttributeSet parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |